package com.example.jdbc_demo;

import com.example.jdbc_demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class JdbcDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(JdbcDemoApplication.class, args);
    }

    @Mapper
    public interface UserMapper {
        //查询用户信息
        @Select("select * from user where id=#{id}")
        public User getUser(int id);
    }
}
